Row

confirmed

1059

Active Cases

861

recovered

171

death

27

Column

Map

Daily cumulative cases

Column

Town cases

COVID19 cases (Erie county)
town confirmed recovered deaths
Buffalo 437 NA NA
Amherst 148 NA NA
Cheektowaga 72 NA NA
Hamburg 70 NA NA
Orchard Park 57 NA NA
Tonawanda 56 NA NA
West Seneca 40 NA NA
Lancaster 37 NA NA
Clarence 27 NA NA
Aurora 22 NA NA
Grand Island 19 NA NA
Alden 16 NA NA
Elma 15 NA NA
Lackawanna 10 NA NA
Evans 10 NA NA
North Collins 5 NA NA
City of Tonawanda 4 NA NA
Boston 3 NA NA
Holland 2 NA NA
Newstead 2 NA NA
Wales 2 NA NA
Marilla 1 NA NA
Brant 1 NA NA
Colden 1 NA NA
Eden 1 NA NA
Concord 1 NA NA
Collins 0 NA NA
Sardinia 0 NA NA
Total 1059 NA NA
Note:
Last updated: (updated 4/5/2020 5PM EST)
Data Source
Public Advisories
The data is only for educational and academic research purposes.

Daily counts

COVID19 Daily cases (Erie county)
date confirmed new active recovered deaths
23 2020-04-05 1059 114 861 171 27
22 2020-04-04 945 143 758 161 26
21 2020-04-03 802 68 639 141 22
20 2020-04-02 734 131 614 101 19
19 2020-04-01 603 50 510 81 12
18 2020-03-31 553 90 481 62 10
17 2020-03-30 463 49 402 53 8
16 2020-03-29 414 34 375 32 7
15 2020-03-28 380 70 347 27 6
14 2020-03-27 310 89 277 27 6
13 2020-03-26 221 75 200 16 5
12 2020-03-25 146 25 139 5 2
11 2020-03-24 121 25 121 0 0
10 2020-03-23 96 32 96 0 0
9 2020-03-22 64 8 64 0 0
8 2020-03-21 56 9 56 0 0
7 2020-03-20 47 18 47 0 0
6 2020-03-19 29 2 29 0 0
5 2020-03-18 27 7 27 0 0
4 2020-03-17 20 13 20 0 0
3 2020-03-16 7 0 7 0 0
2 2020-03-15 7 4 7 0 0
1 2020-03-14 3 3 3 0 0
---
title: COVID19 in Erie county
date: "`r gsub('\\(updated |\\ EST)|/2020', '', attributes(counts)$update.time)`"
output: 
  flexdashboard::flex_dashboard:
    orientation: rows
    navbar:
      - { icon: fa-github, href: "https://github.com/hubentu/COVID19Erie"}
      - { title: "Erie Case Map", href: "https://erieny.maps.arcgis.com/apps/opsdashboard/index.html#/dd7f1c0c352e4192ab162a1dfadc58e1"}
      - { title: "Global Map", href: "https://coronavirus.jhu.edu/map.html"}
    social: menu
    source_code: embed
    vertical_layout: scroll
---

```{r setup, include=FALSE, eval=FALSE}
library(flexdashboard)
library(fontawesome)
library(COVID19Erie)
pubExposed <- exposedPub()
```

```{r}
counts <- caseCounts()
Counts <- rbind(counts,
                c(town = "Total", colSums(counts[,-1])))
ycount <- historyCount$confirmed[historyCount$date == Sys.Date() - 1]
ncount <- attributes(counts)$total.confirmed - ycount
```

Row {data-width=400}
-----------------------------------------------------------------------

### confirmed {.value-box}

```{r}
valueBox(
  value = attributes(counts)$total.confirmed,
  caption = paste0("Total confirmed cases (+", ncount, ")"),
  icon = "fas fa-ambulance",
  color = "purple"
)
```

### Active Cases {.value-box}
```{r}
valueBox(
  value = attributes(counts)$active.cases,
  caption = "Active cases",
  icon = "fas fa-hospital-user",
  color = "#1f77b4"
)
```

### recovered {.value-box}

```{r}
valueBox(
  value = attributes(counts)$total.recovered,
  caption = "Total recovered cases",
  icon = "fas fa-head-side-mask",
  color = "forestgreen"
)
```

### death {.value-box}

```{r}
valueBox(
  value = attributes(counts)$total.deaths,
  caption = "Death cases",
  icon = "fas fa-heart-broken",
  color = "#474747"
)
```


Column {data-height=600}
-----------------------------------------------------------------------
    
### Map
    
```{r}
caseMap(counts, pubExposed, titlePos = NULL)
```

### Daily cumulative cases
```{r}
countPlot(historyCount)
```

Column {data-height=600}
----------------------------------------------------------------------

### Town cases

```{r}
library(knitr)
library(kableExtra)
kable(Counts,
      caption = "COVID19 cases (Erie county)") %>%
    kable_styling(full_width = TRUE) %>% 
    footnote(general = c(paste("Last updated:", attributes(counts)$update.time),
                         "[Data Source](https://erieny.maps.arcgis.com/apps/opsdashboard/index.html#/dd7f1c0c352e4192ab162a1dfadc58e1)",
                         "[Public Advisories](http://www2.erie.gov/health/index.php?q=public-advisories)",
                         "The data is only for educational and academic research purposes.")) %>%
scroll_box(height = "600px")
```

### Daily counts
```{r}
kable(historyCount[order(historyCount$date, decreasing = TRUE),],
      caption = "COVID19 Daily cases (Erie county)") %>%
    kable_styling(full_width = TRUE)%>%
    scroll_box(height = "600px")
```